﻿// See https://aka.ms/new-console-template for more information
using CreatingTypes;

Console.WriteLine("====测试表达式方法=====");
//测试Express-boied
_01Expression_bodied test1 = new _01Expression_bodied();
var value = test1.Foo(100);
Console.WriteLine(value);
Console.WriteLine("====测试localmethod=====");
_02LocalMethod _02LocalMethod = new _02LocalMethod();
_02LocalMethod.WriteCubes();
Console.WriteLine("====测试构造函数=====");
_03InstanceConstructors _03InstanceConstructors = new _03InstanceConstructors("HelloWorld");
_03InstanceConstructors.ShowName();

Console.WriteLine("====测试构造函数2=====");
_03InstanceConstructors _03InstanceConstructors2 = new _03InstanceConstructors("HelloWorld", "My");
_03InstanceConstructors2.ShowName2();

Console.WriteLine("====测试解构函数=====");
var rect = new _04Deconstructors(3, 4);
(float width, float height) = rect;//结构函数调用
Console.WriteLine(width + "" + height);

Console.WriteLine("====测试属性1=====");
_05Properties _05Properties = new _05Properties() { Pitch = 500 };
//_05Properties.Pitch = 900;
_05Properties.Worth = 100;
_05Properties.PrintWorth();

Console.WriteLine("====测试索引器1=====");
_06Indexers _06Indexers = new _06Indexers();
Console.WriteLine(_06Indexers[0]);
Console.WriteLine(_06Indexers[0, 5]);


